<?php $this->load->view('inc/header');?><div style="position: relative;overflow: hidden;padding:5px;padding-right:10px;">
<div class="b4"></div>
<div class="filterbar">

<table width="100%">
	<tr>
		<td class="c2 fb home-icon" width="35">
			<img src="http://www.gravatar.com/avatar/<?php echo md5($member->email);?>?s=30&d=&r=X"/>		
		</td>
		<td>
			<?php echo $member->nname;?>			
			<span class="c3 fs2"><?php echo $member->pslinfo;?></span>
		</td>
		
		<td width="100">主题数：<?php echo $topic_count;?></td>
		<?php if($is_login && !$is_self):?>
		<td  width="120">
			<a class="btn-s wm-ajax"
            	wmtitle="新音乐"
            	wmw="520"
            	wmh="380"
				href="<?php echo site_url('c=topic&m=post&recmd=yes&to_id='.$member->id);?>">推荐歌曲</a>
		</td>
		<?php endif;?>
		<?php if(!$is_self):?>
		<td  width="140">
			<a class="btn-follow-1 btn-ajax <?php echo ($is_followed) ? 'followed' : '';?>" 
				afterdo="follow_afterdo" befordo="follow_befordo" 
				href="<?php echo site_url('c=member&m=follow&id='.$member->id);?>"
			>
				<?php echo ($is_followed) ? '已' : '';?>关注
			</a>
		</td>
		<?php endif;?>
	</tr>
</table>
</div>

<div class="b1"></div>

<?php $this->load->view('inc_topic_list');?>
<?php echo $pagelinks;?>

<script type="text/javascript">
$(function(){
	ajaxinit();
});

function follow_afterdo(msg,$elt){

	if(msg.status == 'followed'){
		$elt.addClass('followed');
		$elt.html('').html('已关注');
	}else if(msg.status == 'unfollowed'){
		$elt.removeClass('followed');
		$elt.html('').html('关注');
	}else if(msg.status == 'unlogin'){
		$('#btn-login').click();
	}
	
	return false;
}

function follow_befordo($elt){

	if($elt.hasClass('followed')){
	　	asyncbox.confirm('Sure 不 Sure ?','警告',function(action){
			if(action == 'ok'){
				$elt.addClass('go');				
				$elt.click();
		　　}
		});
		
		if($elt.hasClass('go')){
			$elt.removeClass('go')
			return true;
		}else{
			return false;
		}
	}

	return true;
}

</script>
</div><?php $this->load->view('inc/footer.php');?>
